home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v8n14.arc / DEFRAG.BAT < prev    next >
DOS Batch File  |  1989-07-06  |  445b  |  28 lines

  1.  
  2.  
  3. ECHO off
  4. CLS    
  5. ECHO Checking condition of drive %1 ...
  6.  
  7. chkdsk %1/F >lpt1:
  8.  
  9. chkfrag %1 /% /L >lpt1:
  10. IF ERRORLEVEL 255 GOTO error
  11. IF ERRORLEVEL 24  GOTO nodefrag
  12.  
  13. ECHO Drive %1 fragmented 25% or more .. starting defrag
  14. defragit %1>lpt1        *** Replace with your utility ***
  15. GOTO end
  16.  
  17. :nodefrag
  18. ECHO Drive %1 does not require defragging
  19. GOTO end
  20.  
  21. :error
  22. ECHO Error occured during CHKFRAG.
  23.  
  24. :end
  25. ECHO DEFRAG done.
  26.  
  27.  
  28.